<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <style>
        .red{
            color: red;
        }
        .black{
            color: black;
        }
    </style>
</head> 

<body>
   
    <div class="box">
        <div>你好</div>
        <div :class="ayy" @click="ayy=='red' ? ayy='black':ayy='red'">啦啦啦</div>
        <div>6666666</div>
    </div>
    <script>
         Vue.createApp({
            data(){
                return{
                   ayy:'red',
                   id:'black'
                }
            }
         }).mount(".box")
    </script>
</body>
</html>